﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Framework.DI.Test.Controllers
{
	[Route("api/[controller]")]
	[ApiController]
	public class UserController : ControllerBase
	{
		private Test test;
		private Test2 test2;

		public UserController(Test test1,Test2 test2) 
		{
			this.test = test1;
			this.test2 = test2;
		}

		[HttpGet(Name = "GetTest")]
		[Route("GetTest")]
		public string GetTest()
		{
			return test.GetUserName();
		}

		[HttpGet(Name = "GetTest2")]
		[Route("GetTest2")]
		public string GetTest2()
		{
			return test2.GetUserName();
		}
	}
}
